﻿<ui:ControlPart x:Class="CPPEI.Coolzon.UI.StaticPartLib.PartVLoopImage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:ui="clr-namespace:CPPEI.Coolzon.UI;assembly=CPPEI.Coolzon.UI"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Canvas Name="_ctlCanvas">
        <Image Name="_ctlImage" Stretch="UniformToFill"/>
        <Rectangle Name="_ctlVisual"
                   Width="{Binding Path=ActualWidth, ElementName=_ctlImage}"
                   Height="{Binding Path=ActualHeight, ElementName=_ctlImage}">
            <Rectangle.Fill>
                <VisualBrush Visual="{Binding ElementName=_ctlImage}" Stretch="UniformToFill" AlignmentX="Left" AlignmentY="Top"/>
            </Rectangle.Fill>
        </Rectangle>
    </Canvas>
</ui:ControlPart>
